Skip to content

feat: add mise-env option to run-script - #6

Merged
albertodonato merged 8 commits into
mainfrom
ack/run-script-tool-versions-file
Oct 26, 2026
Merged

albertodonato merged 8 commits into
mainfrom
ack/run-script-tool-versions-file

Conversation

@albertodonato

@albertodonato albertodonato commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

what

add a mise-env parameter to the run-script workflow to set MISE_ENV, so
that mise.<env>.toml config files are loaded on top of the default config.

Also requires lockfile.

why

Allow using CI-specific tooling without having mise pick it up by default in
the repo

testing

will test in workflows

docs

updated docs

🤖 Generated with Claude Code

@albertodonato
albertodonato requested a review from a team as a code owner October 26, 2026 15:30

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Architecture diagram
sequenceDiagram
    participant Admin as GitHub Actions Admin
    participant WF as run-script Workflow
    participant Action as step-security/action
    participant Setup as Setup Job (setup-mise)
    participant Cache as Pre-commit Cache
    participant Mise as mise Tool Manager
    participant Script as User Script

    Note over Admin,Script: Private CI Workflow for Mise-Provisioned Scripts

    Admin->>WF: Trigger workflow with inputs
    Note right of Admin: inputs.<br/>tool-versions-file (default .tool-versions)

    WF->>WF: Set MISE_DEFAULT_TOOL_VERSIONS_FILENAME env<br/>from inputs.tool-versions-file

    WF->>Action: Harden Runner
    Action-->>WF: Secured environment

    WF->>Setup: Setup Job
    Setup->>Setup: Install mise
    Setup->>Mise: Read tools from<br/>MISE_DEFAULT_TOOL_VERSIONS_FILENAME
    Mise->>Mise: Search working dir up to repo root<br/>for configured filename
    alt Custom tool-versions-file provided
        Mise-->>Setup: Load tools from custom file
    else Default .tool-versions
        Mise-->>Setup: Load tools from .tool-versions
    end
    Setup-->>WF: Tools ready

    WF->>Cache: Restore pre-commit cache
    Cache->>Cache: Compute cache key with<br/>custom tool-versions filename hash
    alt Cache hit
        Cache-->>WF: Restore cache
    else Cache miss
        Cache-->>WF: No cache
    end

    WF->>Script: Execute user script
    Script->>Mise: Use provisioned tools (available on PATH)
    Mise-->>Script: Tool binaries
    Script-->>WF: Script result (success/failure)
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/run-script.yml Resolved
@albertodonato
albertodonato force-pushed the ack/run-script-tool-versions-file branch 2 times, most recently from 7a9a94c to d6e0971 Compare October 26, 2026 16:17
@albertodonato albertodonato changed the title feat: add tool-versions-file option to run-script feat: add mise-config-file option to run-script Oct 26, 2026
@albertodonato
albertodonato force-pushed the ack/run-script-tool-versions-file branch from d6e0971 to 9d3f9bf Compare October 26, 2026 16:33
@albertodonato albertodonato changed the title feat: add mise-config-file option to run-script feat: add mise-env option to run-script Oct 26, 2026
### what

add a `mise-env` parameter to the `run-script` workflow to set `MISE_ENV`, so
that `mise.<env>.toml` config files are loaded on top of the default config.

### why

Allow using CI-specific tooling without having `mise` pick it up by default in
the repo

### testing

will test in workflows

### docs

updated docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@albertodonato
albertodonato force-pushed the ack/run-script-tool-versions-file branch from 9d3f9bf to 420ba6e Compare October 26, 2026 16:34
Comment thread .github/workflows/run-script.yml Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread .github/workflows/run-script.yml Resolved
@albertodonato
albertodonato force-pushed the ack/run-script-tool-versions-file branch from 29b6527 to d4f1f03 Compare October 26, 2026 17:53
Comment thread README.md Resolved
@albertodonato
albertodonato merged commit 48cc95e into main Oct 26, 2026
4 checks passed
@albertodonato
albertodonato deleted the ack/run-script-tool-versions-file branch October 26, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants